{{set . "title" "Home"}}
{{template "header.html" .}}

<h1>Validation samples</h1>

<p>
	Learn how to use the <a href="http://revel.github.com/manual/validation.html">Revel validation framework</a>. Each sample has it own controller and it own templates.
	{{/* Don't forget to take a look at the the <em>conf/messages</em> file. */}}
</p>

<ul>
	<li>
		<h1>Sample 1</h1>
		<p>
			This sample shows very basic validation. All errors are displayed at the top
			of the form.
		</p>
		<p>
			<a href="/Sample1/Index">See the sample</a>
		</p>
	</li>
	<li>
		<h1>Sample 2</h1>
		<p>
			Same controller than for the 1st sample, but errors are displayed inline, next to each
			field.
		</p>
		<p>
			<a href="/Sample2/Index">See the sample</a>
		</p>
	</li>
	<li>
		<h1>Sample 3</h1>
		<p>
			This demonstrates best practice for validating a struct (bean), rather
			than many individual fields.
		</p>
		<p>
			<a href="/Sample3/Index">See the sample</a>
		</p>
	</li>
	<li>
		<h1>Sample 4</h1>
		<p>
			Same validation as Sample 3, but the template use the {{"{{field}}"}} tag
			to scope all field data (error, flash, name, ...) to a single part of the
			template.
		</p>
		<p>
			<a href="/Sample4/Index">See the sample</a>
		</p>
	</li>
</ul>
